<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>判断管理</title>
    <meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" name="viewport">
    <link rel="stylesheet" href="../plugins/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="../plugins/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="../plugins/dropzone/min/dropzone.min.css" />
	<link rel="stylesheet" href="../plugins/dropzone/min/basic.min.css" />
	<link rel="stylesheet" href="../plugins/wangEditor/wangEditor.min.css" />
	<link rel="stylesheet" href="../plugins/iCheck/all.css">
    <link rel="stylesheet" href="../plugins/adminLTE/css/AdminLTE.css">
    <link rel="stylesheet" href="../plugins/adminLTE/css/skins/_all-skins.min.css">
    <link rel="stylesheet" href="../css/style.css">
    
    
	<script src="../plugins/jQuery/jquery-2.2.3.min.js"></script>
	<script src="../plugins/iCheck/icheck.min.js"></script>

	<script type="text/javascript" src="../plugins/angularjs/angular.min.js"></script>
	
	<!--分页组件  -->
		<script type="text/javascript" src="../plugins/angularjs/pagination.js"></script>
		<link rel="stylesheet" href="../plugins/angularjs/pagination.css">
	<!--分页结束  -->
    
    <script type="text/javascript" src="../js/base_pagination.js"></script>
	<script type="text/javascript" src="../plugins/layer/layer.js"></script>
	<script src="../plugins/bootstrap/js/bootstrap.min.js"></script>
    
</head>
<body class="hold-transition skin-red sidebar-mini" ng-app="maiworld" ng-init="question.topicTypes=2" ng-controller="subjectOneC2Controller">
	<div class="box-header with-border">
	     <h3 class="box-title">科目四题库</h3>
	</div>
	
	<div class="box box-primary" >
		<div class="box-header with-border">
			<h3 class="box-title">高级搜索</h3>
		</div>
		<div class="box-body">
			<div class="row">
				<div class="col-xs-4">
					<div class="input-group">
		                <div class="input-group-btn">
		                  <button type="button" class="btn btn-primary">题目ID</button>
		                </div>
		                <!-- /btn-group -->
		                <input type="text" ng-model="question.id" class="form-control" placeholder="请输入题目ID,数字类型">
		              </div>
				</div>
				<div class="col-xs-4">
					<div class="input-group">
		                <div class="input-group-btn">
		                  <button type="button" class="btn btn-primary">问题</button>
		                </div>
		                <!-- /btn-group -->
		                <input type="text" ng-model="question.question" class="form-control" placeholder="请输入问题内容">
		              </div>
				</div>
				<div class="col-xs-4">
					<button type="button" class="btn btn-primary" ng-click="search(paginationConf.currentPage, paginationConf.itemsPerPage)">
						<i class="fa fa-search"></i> 搜索
					</button>
				</div>
				
			</div>

		</div>
		<!-- /.box-body -->
	</div>
	
	<div class="box">
    		<!-- /.box-header -->
            <div class="box-header with-border">
              <span class="box-title" style="margin-right:20px;">判断题列表</span>
             <!--  <button class="btn btn-primary" ng-click="deleteByArr()"><i class="fa fa-fw fa-trash-o"></i>批量删除</button> -->
				
            </div>
            <!-- /.box-body -->
            <div class="box-body">
              <!--数据列表-->
                 <table id="dataList" class="table table-bordered table-striped table-hover dataTable">
                     <thead>
                         <tr>
                          <th class="" style="padding-right:0px">
                              <input id="selall" type="checkbox" class=" minimal checkbox-master" >
                          </th> 
						  <th class="sorting_asc">ID</th>
					      <th class="sorting">问题</th>
					      <th class="sorting">图片路径</th>									      
					      <th class="sorting">选项1</th>
					      <th class="sorting">选项2</th>
					      <th class="sorting">选项3</th>
					      <th class="sorting">选项4</th>
					      <th class="sorting">答案</th>
					      <th class="sorting">题解</th>
					      
					      <th class="sorting">题目类型</th>
					      <th class="sorting">操作</th>
                         </tr>
                     </thead>
                     <tbody>
                       	<tr ng-repeat="question in questionlist">
                       		<td><input id="" type="checkbox" class="minimal" ></td> 
                       		<td>
                       			{{question.id}}
                       		</td> 
                       		
                       		<td>
                       			{{question.question}}
                       		</td>
                       		<td>
                       			<img ng-src="{{question.url}}" style="width:150px;"></img>
                       		</td> 
                       		<td>
                       			{{question.item1}}
                       		</td> 
                       		<td>
                       			{{question.item2}}
                       		</td> 
                       		<td>
                       			{{question.item3}}
                       		</td> 
                       		<td>
                       			{{question.item4}}
                       		</td>
                       		<td>
                       			{{question.answer}}
                       		</td>
                       		<td>
                       			<!-- {{question.explains}} -->
                       			...
                       		</td>
                       		
                       		<td>
                       			{{question.topicTypes==1?'单选题':question.topicTypes==2?'判断题':'多选题'}}
                       		</td>
                       		<td>
                       			<button class="btn btn-info" ng-click="currentquestion($index)" data-toggle="modal" data-target="#modal-default"><i class="fa fa-fw fa-eye"></i>详情</button>
                       		</td>
                       		           		
                       	</tr>		            
                     </tbody>
                 </table>
              <!--数据列表/-->
              
            </div>
            <!-- 分页 -->
            <div class="box-footer clearfix">
				<!-- 分页 -->
				<tm-pagination conf="paginationConf"></tm-pagination>
            </div>
          </div>
   <!-- /.box -->  

	   <div class="modal fade" id="modal-default">
          <div class="modal-dialog" style="width:80%;">
            <div class="modal-content">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                  <span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">修改题目</h4>
              </div>
              <div class="modal-body">
<!-- 文章内容 -->
	         <!-- Horizontal Form -->
          <div class="box box-info">
            <div class="box-header with-border">
              <h3 class="box-title">题目内容</h3>
            </div>
            <!-- /.box-header -->
            <!-- form start -->
            <div class="form-horizontal">
              <div class="box-body">
                <div class="form-group">
                  <label for="inputEmail3" class="col-sm-2 control-label">问题</label>

                  <div class="col-sm-10">
                  <input type="hidden" id="id" >
                    <input type="text" id="question" ng-model="currentques.question" class="form-control"   placeholder="请输入问题内容">
                  </div>
                </div>
                
   				<div class="form-group" >
					<label for="inputPassword3" class="col-sm-2 control-label">图片/视频</label>
					<div class="col-sm-3">
						<img id="image" src="" style="width:100%;"></img>
					</div>
					<div class="col-sm-2">
						<p>绝大部分题目显示的是图片，少部分是小视频MP4</p>
					</div>
					<div class="col-sm-5">
						<video width="320" controls id="video"   playsinline webkit-playsinline="true" x5-video-player-type="h5">
						</video> 
					</div>
				</div>
				
                <div class="form-group">
                  <label for="inputPassword3" class="col-sm-2 control-label">图片/视频路径</label>
                  <div class="col-sm-10">
                    <input type="text"  class="form-control" id="url" ng-model="currentques.url" placeholder="图片/视频路径">
                  </div>
                </div>
                
				<div class="form-group">
					  <label for="inputPassword3" class="col-sm-2 control-label">重新上传MP4</label>
	                  <div class="col-sm-3">
	                    <input type="file" file-model="myFile">
	                  </div>
	                  <div class="col-sm-2">
	                    <button type="submit" class="btn btn-primary" ng-click="save()">上传</button>
	                  </div>
	                  <div class="col-sm-5">
	                    <p style="color:red;">swf动态图片小程序不支持，需转换成MP4视频上传替换</p>
	                  </div>
                </div>
                
                <div class="form-group">
                  <label for="inputPassword3" class="col-sm-2 control-label">选项A</label>
                  <div class="col-sm-10">
                    <input type="text"   class="form-control" id="item1" ng-model="currentques.item1" placeholder="选项1,例：小型车车道">
                  </div>
                </div>
                
                <div class="form-group">
                  <label for="inputPassword3" class="col-sm-2 control-label">选项B</label>
                  <div class="col-sm-10">
                    <input type="text"   class="form-control" id="item2" ng-model="currentques.item2" placeholder="选项2,例：小型车车道">
                  </div>
                </div>
                
                <div class="form-group">
                  <label for="inputPassword3" class="col-sm-2 control-label">选项C</label>
                  <div class="col-sm-10">
                    <input type="text"   class="form-control" id="item3" ng-model="currentques.item3" placeholder="选项3,例：小型车车道">
                  </div>
                </div>
                
                <div class="form-group">
                  <label for="inputPassword3" class="col-sm-2 control-label">选项D</label>
                  <div class="col-sm-10">
                    <input type="text"   class="form-control" id="item4" ng-model="currentques.item4" placeholder="选项4,例：小型车车道">
                  </div>
                </div>
                
                <div class="form-group">
                  <label for="inputPassword3" class="col-sm-2 control-label">答案</label>
                  <div class="col-sm-10">
                    <input type="text"   class="form-control" id="answer" ng-model="currentques.answer" placeholder="答案为数字类型">
                  </div>
                </div>
				<div class="form-group">
                  <label for="inputPassword3" class="col-sm-2 control-label"></label>
                  <div class="col-sm-10">
                    <p style="color:red;">说明：        "1": "A或者正确","2": "B或者错误","3": "C","4": "D","7": "AB","8": "AC","9": "AD","10": "BC","11": "BD","12": "CD","13": "ABC","14": "ABD","15": "ACD","16": "BCD","17": "ABCD"</p>
                  </div>
                </div>
		               
				
				<div class="form-group" >
					<label for="inputPassword3" class="col-sm-2 control-label">题解</label>
					<div class="col-sm-10">
						<div id="editor"></div>
						<input type="hidden" id="explains"></input>
					</div>
				</div>
                
                <div class="form-group">
                  <label for="inputPassword3" class="col-sm-2 control-label">题目类型</label>
                  <div class="col-sm-10">
                    <input type="text"  class="form-control" id="topicTypes" ng-model="currentques.topicTypes" placeholder="题目类型：数字类型">
                  </div>
                </div>
                <div class="form-group">
                  <label for="inputPassword3" class="col-sm-2 control-label"></label>
                  <div class="col-sm-10">
                    <p style="color:red;">说明：     题目类型：数字类型，1：单选题，2：判断题，3：多选题</p>
                  </div>
                </div>
                
              </div>

            </div>
          </div>
<!-- 文章内容  -->
              </div>
              <div class="modal-footer">
                <button type="button" class="btn btn-default pull-left"  data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary" ng-click="saveContent()">提交修改</button>
              </div>
            </div>
            <!-- /.modal-content -->
          </div>
          <!-- /.modal-dialog -->
        </div>
        <!-- /.modal -->
   	
	<script type="text/javascript" src="../plugins/wangEditor/wangEditor.min.js"></script>
	<script type="text/javascript" src="../plugins/wangEditor/js/plupload/plupload.full.min.js"></script>
    <script type="text/javascript" src="../plugins/wangEditor/js/plupload/i18n/zh_CN.js"></script>
    <script type="text/javascript" src="../plugins/wangEditor/js/qiniu.js"></script>
	<script type="text/javascript" src="../plugins/dropzone/dropzone.js"></script>

    <script type="text/javascript" src="../js/controller/baseController.js"></script>
    <script type="text/javascript" src="../js/controller/subjectOneC2Controller.js"></script>
	<script type="text/javascript">
	//编辑器
	var E = window.wangEditor;
	var editor = new E('#editor');
	editor.create();	
	</script>

</body>
</html>